package com.oauth.facebook.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.oauth.components.client.ui.footer.FooterUI;
import com.oauth.components.client.ui.header.HeaderUI;
import com.oauth.facebook.client.ui.MainPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class LocalEntryPoint implements EntryPoint {

	private static LinkedinEntryPointUiBinder uiBinder = GWT
			.create(LinkedinEntryPointUiBinder.class);

	interface LinkedinEntryPointUiBinder extends UiBinder<DockLayoutPanel, LocalEntryPoint> {
	}

	@UiField
	HeaderUI header;

	@UiField
	FooterUI footer;

	@UiField
	MainPanel mainPanel;

	public void onModuleLoad() {
		DockLayoutPanel p = uiBinder.createAndBindUi(this);

		mainPanel.initMainPanel();
		// ScrollPanel sPanel = new ScrollPanel(twitterPanel);
		// p.add(centerPanel);

		// Window.enableScrolling(true);
		// Attach the LayoutPanel to the RootLayoutPanel. The latter will listen
		// for
		// resize events on the window to ensure that its children are informed
		// of
		// possible size changes.
		// RootPanel rootPanel = RootPanel.get("facebook");
		RootLayoutPanel rp = RootLayoutPanel.get();
		rp.add(p);
		// rootPanel.add(facebookPanel);

		// RootPanel.get().add(dockPanel);
	}

}
